package core;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;

public class QueryFileReader {
	public static List<QueryParser> getParsers(String queryFile) {
		BufferedReader in;
		List<QueryParser> parsers = new LinkedList<QueryParser>();
		try {
			in = new BufferedReader(new FileReader(queryFile));
			String str;
			while ((str = in.readLine()) != null) {
				if (!str.startsWith("#")){
					parsers.add(new QueryParser(str));
				}
			}
			in.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return parsers;
	}

}
